package cn.bonoon.kernel.menus;

import java.util.ArrayList;
import java.util.List;

public class TabInfo extends AbstractItemInfo{
	public TabInfo(){}
	
	public TabInfo(int ordinal, String id, String name){
		this.id = id;
		this.name = name;
		this.ordinal = ordinal;
	}
	protected ChannelInfo channel;
	protected final List<TabItem> items = new ArrayList<TabItem>();
	
	public TabInfo init(){
		return this;
	}

	public void button(StringBuilder a, String selected) {
		_button(href, a, selected);
	}

	public void add(TabItem tab){
		items.add(tab);
	}
	
	public List<TabItem> getItems() {
		return items;
	}

	public boolean isEmpty() {
		return items.isEmpty();
	}

	public ChannelInfo getChannel() {
		return channel;
	}
}
